<template>
  <div class="wrap">
    <div class="login">
			<div class="content-padded">
				<div class="searchbar">
					<div class="search-input">
						<input type="text" class="text" v-model="userAccount" placeholder='账号:' />
					</div>
					<div class="search-input">
						<input type="password" class="password" v-model="userPassword" placeholder='密码:'/>
					</div>
				</div>
				<!-- <a href="">忘记密码</a> -->
				<button type="button" @click="login()">登录</button>
			</div>
			<div class="login-logo" @click="getDetail()">
				<img src="../../../../asset/images/WechatIMG25.png" alt="">
				<span @click="test()">医宝通</span>
			</div>
		</div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        userAccount:'',
        userPassword:''
      }
    },
    methods:{
      login(){
        this.$http.post('http://192.168.1.121:8002/hospital/api/login',{'userAccount':this.userAccount,'userPassword':this.userPassword}).then(res=>{
            console.log('res',res)
            if(res.data.code==0){
              // this.$router.push('/detail')
            }
        })
      },
      getDetail(){
        this.$http.get('/api/article/10').then(res=>{
            console.log('res',res)
        })
			},
			test(){
				// window.location.href = 'http://www.baidu.com'
				this.$toast('tjisjjsljsdajdsl')
			}
    }
    
  }
</script>

<style scoped>
.wrap{
  height: 100vh;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
.login{
	background:url(../../../../asset/images/WechatIMG37.png) no-repeat;
	background-size:100% 14rem;
	height: 100%;
}
.content-padded{
	position: absolute;
	top:11rem;
	left: 10%;
	width: 80%;
	height:10rem;
	background: #fff;
	padding: 1rem 1.2rem;
	border-radius: 0.5rem;
	box-shadow:0px 0px 4px #ccc;
}
.content-padded a{
	font-size: 0.6rem;
	text-decoration:underline;
	float: right;
}
.searchbar{
	padding: 0.8rem 0 3rem 0;
}
.searchbar .search-input{
	padding: 0.3rem 0;
}
.searchbar .search-input input {
    border-radius: 5px;
    border: 1px solid #ccc;
    height: 2.4rem;
}
.content-padded button{
	margin-top:1rem;
	width:100%;
	height: 2.4rem;
	border: none;
	background:#00BFFF;
	border-radius: 2rem;
	color: #FFFFFF;
}
.login-logo{
	position: fixed;
	left:calc(50% - 36px);
	bottom: 2rem;
	font-size: .8rem;
}
.login-logo img{
	width: 1rem;
	height: 1rem;
	vertical-align:sub;
}


</style>